home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 2
/
Gold Medal Software Volume 2 (Gold Medal) (1994).iso
/
virus
/
prexcm31.arj
/
PROTECT.BAT
< prev
next >
Wrap
DOS Batch File
|
1993-08-26
|
2KB
|
55 lines
echo off
rem
rem With this UNREGISTERED version, you will probably just want to run
rem PROTEXCM.EXE with no parameters and be able to select your files and
rem have them compressed from Protect!'s listings.
rem
cls
if '%2'=='' goto oops
if exist %1.%2 goto filefound
:oops
echo To use PROTECT.BAT, the first parameter is the name part of the filename
echo and the second part is the extension.
echo
echo Here is an example to protect MYPROG.EXE:
echo PROTECT MYPROG EXE (There's no dot '.' between the name & extension)
echo Here is an example to protect MYPROG.COM:
echo PROTECT MYPROG COM
echo
echo (Basically, just leave out the period and use a space between the
echo filename and the extension.)
echo
echo Please only use this on files that have not already been compressed!!!
goto end
:filefound
if %2==COM goto comfile
if %2==com goto comfile
if %2==Com goto comfile
if %2==COm goto comfile
if %2==cOM goto comfile
if %2==cOm goto comfile
if %2==coM goto comfile
if exist %1.old del %1.old >NUL
if exist %1.tmp del %1.tmp >NUL
rem
rem YOU CAN USE PKLITE BELOW, BUT USE THE -B (BACKUP) OPTION AND CHANGE
rem THE SUFFIXES FROM .OLD TO .BAK as in:
rem
rem PKLite %1.EXE -B
rem ren %1.Bak %1.Old
rem
lzexe %1.EXE
if exist %1.old goto exenormal
echo %1.EXE Could Not Be Compressed By LZEXE...
goto end
:exenormal
ren %1.old %1.tmp
protexcm %1.EXE
del %1.old >NUL
ren %1.tmp %1.old
echo %1.EXE has been protected, %1.OLD is the original!
goto end
:comfile
rem SEE THE COMMENT ABOVE ABOUT PKLITE, BUT ON COM FILES!!!!!!!
protexcm %1.COM
:end